package org.phantom.securityframework.auth.realm;

import org.apache.shiro.subject.Subject;

/**
 * 获取帐号
 * @author david
 * 13.1.5 recordLogin可以走AbstractShiroFilter.updateSessionLastAccessTime
 *
 */
public interface SubjectRealm {
	/**
	 * 根据身份标示获取帐号
	 * @param principal
	 * @return
	 */
	Subject getSubject(String principal);
	
	/**
	 * 登录成功后记录登录时间
	 * @param principal
	 * @return
	 */
	Subject recordLogin(Subject subject);
}
